<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="csoei.bbs.Dao.CategoryDao"%>
<%@ page import="java.sql.ResultSet"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="css/frame.css" type="text/css" />
<meta http-equiv="Content-Language" content="cs" />
<title>论坛列表</title>
</head>
<body>
论坛类别列表<div class="right"><span class="userlogin"><% if(session.getAttribute("username")!=null){out.print("欢迎回来"+session.getAttribute("username")+"！&nbsp;&nbsp;<a href=\"logout\">退出登录</a>");}else{out.print(
"<form action=\"login\" method=\"post\"><input checked=\"checked\" name=\"username\" size=\"11\" value=\"请输入用户名\" onfocus=\"if(this.value='请输入用户名')this.value=''\" onblur=\"if(this.value=='')this.value='请输入用户名'\" /><input type=\"password\" size=\"11\" name=\"password\" value=\"\" /><input type=\"submit\" value=\"点击登录\" /></form>"
);} %></span></div>
<div class="categorylist"><div>&nbsp;</div><% int cid;String catname;String catintro;
ResultSet category=null;if(CategoryDao.getCategories()!=null){category=CategoryDao.getCategories();while(category.next()){cid=category.getInt(1);catname=category.getString(2);catintro=category.getString(3);
out.print("\n<a href=\"bbscat.jsp?cid="+cid+"\">"+catname+"</a><div class=\"catintro\">"+catintro+"</div>");}
category.close();
}
%>
</div>
</body>
</html>